package com.github.caijh.mall.finance.service;

import java.math.BigDecimal;
import java.util.HashMap;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.caijh.mall.common.PageParams;
import com.github.caijh.mall.finance.model.UserRecharge;
import com.github.caijh.mall.finance.request.UserRechargeRefundRequest;
import com.github.caijh.mall.finance.request.UserRechargeSearchRequest;
import com.github.caijh.mall.finance.response.UserRechargeResponse;
import com.github.caijh.mall.front.request.UserRechargeRequest;
import com.github.pagehelper.PageInfo;

/**
 * UserRechargeService 接口
 * +----------------------------------------------------------------------
 * | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
 * +----------------------------------------------------------------------
 * | Author: CRMEB Team <admin@crmeb.com>
 * +----------------------------------------------------------------------
 */
public interface UserRechargeService extends IService<UserRecharge> {

    PageInfo<UserRechargeResponse> getList(UserRechargeSearchRequest request, PageParams pageParams);

    HashMap<String, BigDecimal> getBalanceList();

    UserRecharge getInfoByEntity(UserRecharge userRecharge);

    UserRecharge create(UserRechargeRequest request);

    Boolean complete(UserRecharge userRecharge);

    BigDecimal getSumBigDecimal(Integer uid);

    /**
     * 充值退款
     *
     * @param request 退款参数
     * @return
     */
    Boolean refund(UserRechargeRefundRequest request);

}
